package org.groupg.practice.juneau;

import org.apache.juneau.marshaller.*;

public class Demo {
    public static void main(String[] args) {
        // Produces:
        // "{"name":"John Smith","age":21}"
        String json = Json.of(new Person());

        // Parse back into a bean.
        Person person = Json.to(json, Person.class);

        // Various other languages.
        String json5 = Json5.of(person);
        String xml = Xml.of(person);
        String html = Html.of(person);
        String urlEncoding = UrlEncoding.of(person);
        String uon = Uon.of(person);
        String openApi = OpenApi.of(person);

//        String rdfXml = RdfXml.of(person);
//        String rdfXmlAbbriev = RdfXmlAbbrev.of(person);
//        String n3 = N3.of(person);
//        String nTriple = NTriple.of(person);
//        String turtle = Turtle.of(person);
        String plainText = PlainText.of(person);
        String csv = Csv.of(person);
        byte[] msgPack = MsgPack.of(person);
        System.out.println("json: " + json);
        System.out.println("json5: " + json5);
        System.out.println("xml: " + xml);
        System.out.println("html: " + html);
        System.out.println("urlEncoding: " + urlEncoding);
        System.out.println("uon: " + uon);
        System.out.println("openApi: " + openApi);
        System.out.println("plainText: " + plainText);
        System.out.println("csv: " + csv);
        System.out.println("msgPack: " + msgPack);

    }
}
